<template>
	<view class="repeat-order-slot">
		<view class="row clickable" @click="copy(orderId)">
			<text>订单编号：{{ orderId }}</text>
		</view>
		<view class="row">
			<view class="col">
				<text>最近订单：</text>
				<u-tag text="--" type="success" size="mini" />
			</view>
			<view class="col">
				<text>历史金额：</text>
				<u-tag text="--" type="primary" size="mini" />
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
defineProps<{
	orderId: string;
}>();

const copy = (text: string) => {
	uni.setClipboardData({
		data: text,
		success: () => uni.showToast({ title: '已复制', icon: 'none' })
	});
};
</script>

<style lang="scss" scoped>
.repeat-order-slot {
	font-size: 28rpx;
}
.row {
	display: flex;
	align-items: center;
	margin-bottom: 12rpx;

	.col {
		display: flex;
		margin-right: 20px;
	}
}
.clickable {
	color: #007aff;
}
</style>
